import Vue from "vue";
import App from "./App.vue";

Vue.config.productionTip = false;

const role = "admin";

Vue.directive("role", {
  bind(el, binding) {
    console.log("bind");
  },
  inserted(el, binding) {
    console.log("inserted");
    if (binding.value !== role) {
      console.log("1", el);
      el.remove();
    }
  },
  update(el, binding) {
    console.log("update");
  },
  componentUpdated(el, binding) {
    console.log("componentUpdated");
  },
  unbind(el, binding) {
    console.log("upbind");
  },
})
Vue.filter("add", (value) => {
  return "￥" + value;
})

new Vue({
  render: (h) => h(App),
}).$mount("#app");
